﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="restaurantDetails.aspx.vb" Inherits="WebApplication3.restaurantDetails" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="ID" DataSourceID="SqlDataSource1">
        <Columns>
            <asp:BoundField DataField="RName" HeaderText="RName" SortExpression="RName" />
            <asp:BoundField DataField="RAddress" HeaderText="RAddress" 
                SortExpression="RAddress" />
            <asp:BoundField DataField="RWebsite" HeaderText="RWebsite" 
                SortExpression="RWebsite" />
            <asp:BoundField DataField="AveragePriceInPounds" 
                HeaderText="AveragePriceInPounds" SortExpression="AveragePriceInPounds" />
            <asp:BoundField DataField="Tel" HeaderText="Tel" SortExpression="Tel" />
            <asp:BoundField DataField="MichelinStars" HeaderText="MichelinStars" 
                SortExpression="MichelinStars" />
            <asp:ImageField DataImageUrlField="RPicture">
                <ControlStyle BorderStyle="None" Height="400px" Width="400px" />
            </asp:ImageField>
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:RestaurantConnection %>" 
        ProviderName="<%$ ConnectionStrings:RestaurantConnection.ProviderName %>" 
        SelectCommand="SELECT [ID], [RName], [RAddress], [RWebsite], [RPicture], [AveragePriceInPounds], [Tel], [MichelinStars] FROM [Restaurants] WHERE ([ID] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
    <br />
    <br />
    <br />
    <br />
    <br />
    <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
        DataSourceID="SqlDataSource2">
        <Columns>
            <asp:BoundField DataField="Author" HeaderText="Author" 
                SortExpression="Author" />
            <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
            <asp:BoundField DataField="CommentBody" HeaderText="CommentBody" 
                SortExpression="CommentBody" />
            <asp:BoundField DataField="Restaurant_FKID" HeaderText="Restaurant_FKID" 
                SortExpression="Restaurant_FKID" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:RestaurantConnection %>" 
        ProviderName="<%$ ConnectionStrings:RestaurantConnection.ProviderName %>" 
        SelectCommand="SELECT [Author], [Title], [CommentBody], [Restaurant_FKID] FROM [Comments] WHERE ([Restaurant_FKID] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="Restaurant_FKID" QueryStringField="id" 
                Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
    User:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:TextBox ID="txtusername" runat="server" Width="252px"></asp:TextBox>
    <br />
    Title:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:TextBox ID="txttitle" runat="server" Width="253px"></asp:TextBox>
    <br />
    Comment:<br />
    <asp:TextBox ID="txtcomment" runat="server" Height="228px" Width="567px"></asp:TextBox>
    <br />
    <br />
    <asp:Button ID="btncomment" runat="server" Text="Add Comment" Width="176px" />
</asp:Content>
